var createError = require('http-errors');
var express = require('express');
var path = require('path');
var cookieParser = require('cookie-parser');
var logger = require('morgan');

var indexRouter = require('./routes/index');
var usersRouter = require('./routes/users');
var http = require('http');
var app = express();
var server = http.createServer(app);

let praiseCornJob = require('./cornJob/praise')
let getToken = require('./cornJob/getQinglong')
let newsCycleTask = require('./cornJob/60snews')
// praiseCornJob()
// getToken()
newsCycleTask()
app.use('/', indexRouter);
app.use('/users', usersRouter);


// server.listen(3002);
module.exports = app;
